<?
class Response 
{
    var $result     = "-1";
    var $respMSG    = "";
    var $message    = "";
    var $message1   = "";
    var $message2   = "";
    var $authCode   = "";
    var $PNRef      = "";
    var $hostCode   = "";
    var $hostURL    = "";
    var $receiptURL = "";
    var $getAVSResult      = "";
    var $getAVSResultTXT   = "";
    var $getStreetMatchTXT = "";
    var $getZipMatchTXT    = "";
    var $getCVResult       = "";
    var $getCVResultTXT    = "";
    var $getGetOrigResult  = "";
    var $getCommercialCard = "";
    var $workingKey        = "";
    var $keyPointer        = "";
    var $invNum            = "";
    var $cardType          = "";
    var $extData           = "";
    var $theResponseXmlStr = "";
    
    var $request = "";

    function Response($responseXmlStr,$request="") 
    {
        $this->request = $request;
        $this->theResponseXmlStr = $responseXmlStr;
        $util = new Util();
        $this->result            = $util->retriveFromXMLTag($this->theResponseXmlStr, "Result");
        $this->respMSG           = $util->retriveFromXMLTag($this->theResponseXmlStr, "RespMSG");
        $this->message           = $util->retriveFromXMLTag($this->theResponseXmlStr, "Message");
        $this->message1          = $util->retriveFromXMLTag($this->theResponseXmlStr, "Message1");
        $this->message2          = $util->retriveFromXMLTag($this->theResponseXmlStr, "Message2");
        $this->authCode          = $util->retriveFromXMLTag($this->theResponseXmlStr, "AuthCode");
        $this->PNRef             = $util->retriveFromXMLTag($this->theResponseXmlStr, "PNRef");
        $this->hostCode          = $util->retriveFromXMLTag($this->theResponseXmlStr, "HostCode");
        $this->hostURL           = $util->retriveFromXMLTag($this->theResponseXmlStr, "HostURL");
        $this->receiptURL        = $util->retriveFromXMLTag($this->theResponseXmlStr, "ReceiptURL");
        $this->getAVSResult      = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetAVSResult");
        $this->getAVSResultTXT   = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetAVSResultTXT");
        $this->getStreetMatchTXT = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetStreetMatchTXT");
        $this->getZipMatchTXT    = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetZipMatchTXT");
        $this->getCVResult       = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetCVResult");
        $this->getCVResultTXT    = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetCVResultTXT");
        $this->getGetOrigResult  = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetGetOrigResult");
        $this->getCommercialCard = $util->retriveFromXMLTag($this->theResponseXmlStr, "GetCommercialCard");
        $this->workingKey        = $util->retriveFromXMLTag($this->theResponseXmlStr, "WorkingKey");
        $this->keyPointer        = $util->retriveFromXMLTag($this->theResponseXmlStr, "KeyPointer");
        $this->invNum            = $util->retriveFromXMLTag($this->theResponseXmlStr, "InvNum");
        $this->cardType          = $util->retriveFromXMLTag($this->theResponseXmlStr, "CardType");
        $this->extData           = $util->retriveFromXMLTag($this->theResponseXmlStr, "ExtData");
    }
}
?>
